home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-src / doc / errors.doc < prev    next >
Text File  |  1999-01-01  |  31KB  |  1,210 lines

  1.   0: "declaration expected" (Fatal, Error, ANSI-violation)
  2.  
  3.         Something is pretty wrong with the source.
  4.  
  5.  
  6.   1: "only one input file allowed" (Fatal)
  7.  
  8.         vbcc accepts only a single filename to compile. You can use a
  9.         frontend to compile multiple files or perhaps you mistyped an
  10.         option.
  11.  
  12.  
  13.   2: "Flag <%s> specified more than once" ()
  14.  
  15.         You specified a command line option that should be specified only
  16.         once more than once. Maybe you have this option in your config-file
  17.         and used it in the command line, too?
  18.         The first occurrence will override the latter ones.
  19.  
  20.  
  21.   3: "Flag <%s> needs string" (Fatal)
  22.  
  23.         This option hast to be specified with a string parameter, e.g.
  24.         -flag=foobar
  25.  
  26.  
  27.   4: "Flag <%s> needs value" (Fatal)
  28.  
  29.         This option hast to be specified with an integer parameter, e.g.
  30.         -flag=1234
  31.  
  32.  
  33.   5: "Unknown Flag <%s>" (Fatal)
  34.  
  35.         This option is not recognized by vbcc. Perhaps you mistyped it, used
  36.         the wrong case or specified an option of the frontend to vbcc?
  37.  
  38.  
  39.   6: "No input file" (Fatal)
  40.  
  41.         You did not specify an input file. Your source file should not start
  42.         with a '-' and if you use a frontend make sure it has the proper
  43.         suffix.
  44.  
  45.  
  46.   7: "Could not open <%s> for input" (Fatal)
  47.  
  48.         A file could not be opened.
  49.  
  50.  
  51.   8: "need a struct or union to get a member" (Error, ANSI-violation)
  52.  
  53.         The source contains something like a.b where a is not a structure
  54.         or union.
  55.  
  56.  
  57.   9: "too many (%d) nested blocks" (Fatal, Error)
  58.  
  59.         vbcc only allows a maximum number of nested blocks
  60.         (compund-statements). You can increase this number by changing
  61.         the line #define MAXN <something> in vbc.h and recompiling vbcc.
  62.  
  63.  
  64.  10: "left block 0" (Error, ANSI-violation)
  65.  
  66.         This error should not occur.
  67.  
  68.  
  69.  11: "incomplete struct <%s>" (Error, ANSI-violation)
  70.  
  71.         You tried to get a member of an incomplete structure/union.
  72.         You defined struct x y; somewhere without defining struct x{...}.
  73.  
  74.  
  75.  12: "out of memory" (Fatal, Error)
  76.  
  77.         Guess what.
  78.  
  79.  
  80.  13: "redeclaration of struct <%s>" (Error, ANSI-violation)
  81.  
  82.         You may not redeclare a struct/union in the same block.
  83.  
  84.  
  85.  14: "incomplete type (%s) in struct" (Error, ANSI-violation)
  86.  
  87.         Every member in a struct/union declaration must be complete.
  88.         Perhaps you only wanted a pointer to that type and forgot the '*'?
  89.  
  90.  
  91.  15: "function (%s) in struct/union" (Error, ANSI-violation)
  92.  
  93.         Functions cannot be members of structs/unions.
  94.  
  95.  
  96.  16: "redeclaration of struct/union member <%s>" (Error, ANSI-violation)
  97.  
  98.         Two members of a struct/union have the same name.
  99.  
  100.  
  101.  17: "redeclaration of <%s>" (Error, ANSI-violation)
  102.  
  103.         You used a name already in use in an enumeration.
  104.  
  105.  
  106.  18: "invalid constant expression" (Error, ANSI-violation)
  107.  
  108.         ??? Nowhere to find...
  109.  
  110.  
  111.  19: "array dimension must be constant integer" (Error, ANSI-violation)
  112.  
  113.         The dimensions of an array must be constants (real constants,
  114.         const int x=100; int y[x]; is not allowed) and integers
  115.         (int y[100.0]; is not allowed either).
  116.  
  117.  
  118.  20: "no declarator and no identifier in prototype" (Error, ANSI-violation)
  119.  
  120.  
  121.  
  122.  21: "invalid storage-class in prototype" (Error, ANSI-violation)
  123.  
  124.         Function parameters may only be auto or register.
  125.  
  126.  
  127.  22: "void not the only function argument" (Error, ANSI-violation)
  128.  
  129.         You tried to declare a function that has an argument of type void
  130.         as well as other arguments.
  131.  
  132.  
  133.  23: "<%s> no member of struct/union" (Error, ANSI-violation)
  134.  
  135.         The struct/union does not contain a member called like that.
  136.  
  137.  
  138.  24: "increment/decrement is only allowed for aithmetic and pointer types" (Error, ANSI-violation)
  139.  
  140.  
  141.  
  142.  25: "functions may not return arrays or functions" (Error, ANSI-violation)
  143.  
  144.  
  145.  
  146.  26: "only pointers to functions can be called" (Error, ANSI-violation)
  147.  
  148.         You tried to call something that did not decay into a pointer to
  149.         a function.
  150.  
  151.  
  152.  27: "redefinition of var <%s>" (Error, ANSI-violation)
  153.  
  154.  
  155.  
  156.  28: "redeclaration of var <%s> with new storage-class" (Error, ANSI-violation)
  157.  
  158.  
  159.  
  160.  29: "first operand of conditional-expression must be arithmetic or pointer type" (Error, ANSI-violation)
  161.  
  162.  
  163.  
  164.  30: "multiple definitions of var <%s>" (Error, ANSI-violation)
  165.  
  166.         There have been multiple definitions of a global variable with
  167.         initialization.
  168.  
  169.  
  170.  31: "operands of : do not match" (Error, ANSI-violation)
  171.  
  172.         In an expression of the form a ? b : c
  173.         - a and b must have the same type or
  174.         - a and b both must have arithmetic types or
  175.         - one of them must be a pointer and the other must be void * or 0
  176.  
  177.  
  178.  32: "function definition in inner block" (Error, ANSI-violation)
  179.  
  180.         C does not allow nested functions.
  181.  
  182.  
  183.  33: "redefinition of function <%s>" (Error, ANSI-violation)
  184.  
  185.         Defining two functions with the same name in one translation-unit
  186.         is no good idea.
  187.  
  188.  
  189.  34: "invalid storage-class for function" (Error, ANSI-violation)
  190.  
  191.         Functions must not have storage-classes register or auto.
  192.  
  193.  
  194.  35: "declaration-specifiers expected" (Error, ANSI-violation)
  195.  
  196.  
  197.  
  198.  36: "declarator expected" (Error, ANSI-violation)
  199.  
  200.  
  201.  
  202.  37: "<%s> is no parameter" (Error, ANSI-violation)
  203.  
  204.         In an old-style function definition you tried to declare a name as
  205.         parameter which was not in the identifier-list.
  206.  
  207.  
  208.  38: "assignment of different structs/unions" (Error, ANSI-violation)
  209.  
  210.  
  211.  
  212.  39: "invalid types for assignment" (Error, ANSI-violation)
  213.  
  214.         In an assignment-context (this includes passing arguments to
  215.         prototyped functions) the source and target must be one of the
  216.         following types:
  217.  
  218.         - both are arithmetic types
  219.         - both are the same struct/union
  220.         - one of them is a pointer to void and the other one is any pointer
  221.         - the target is any pointer and the source is an integral
  222.           constant-expression with the value 0
  223.         - both are pointer to the same type (here the target may have
  224.           additional const/volatile qualifiers - not recursively, however)
  225.  
  226.         Any other combinations should be illegal.
  227.  
  228.  
  229.  40: "only 0 can be compared against pointer" (Warning, ANSI-violation)
  230.  
  231.         You may not compare a pointer against any other constant but a
  232.         0 (null pointer).
  233.  
  234.  
  235.  41: "pointers do not point to the same type" (Warning, ANSI-violation)
  236.  
  237.         You tried to compare or assign pointers that point to different
  238.         types. E.g. the types they point to may have different attributes.
  239.  
  240.  
  241.  42: "function initialized" (Error, ANSI-violation)
  242.  
  243.         There was a '=' after a function declaration.
  244.  
  245.  
  246.  43: "initialization of incomplete struct" (Error, Fatal, ANSI-violation)
  247.  
  248.         A structure is incomplete if the only its name, but not the
  249.         content is known. You cannot do much with such structures.
  250.  
  251.  
  252.  44: "initialization of incomplete union" (Error, Fatal, ANSI-violation)
  253.  
  254.         A union is incomplete if the only its name, but not the
  255.         content is known. You cannot do much with such unions.
  256.  
  257.  
  258.  45: "empty initialization" (Error, ANSI-violation)
  259.  
  260.         There was no valid expression after the '=' in a variable definition.
  261.  
  262.  
  263.  46: "initializer not a constant" (Error, ANSI-violation)
  264.  
  265.         Static variables and compound types may only be initialized with
  266.         constants.
  267.         Variables with const qualifier are no valid constant-expressions
  268.         here.
  269.  
  270.         Addresses of static variables are ok, but casting them may turn
  271.         them into non-constant-expressions.
  272.  
  273.  
  274.  47: "double type-specifier" (Warning, ANSI-violation)
  275.  
  276.  
  277.  
  278.  48: "illegal type-specifier" (Warning, ANSI-violation)
  279.  
  280.  
  281.  
  282.  49: "multiple storage-classes" (Warning, ANSI-violation)
  283.  
  284.  
  285.  
  286.  50: "storage-class specifier should be first" (Warning, ANSI-violation)
  287.  
  288.  
  289.  
  290.  51: "bitfields must be ints" (Warning, ANSI-violation)
  291.  
  292.  
  293.  
  294.  52: "bitfield width must be constant integer" (Warning, ANSI-violation)
  295.  
  296.  
  297.  
  298.  53: "struct/union member needs identifier" (Warning, ANSI-violation)
  299.  
  300.  
  301.  
  302.  54: "; expected" (Warning, ANSI-violation)
  303.  
  304.         Probably you forgot a ';' or there is a syntactic error in an
  305.         expression.
  306.  
  307.  
  308.  55: "struct/union has no members" (Warning, ANSI-violation)
  309.  
  310.         You defined an empty struct or union.
  311.  
  312.  
  313.  56: "} expected" (Warning, ANSI-violation)
  314.  
  315.  
  316.  
  317.  57: ", expected" (Warning, ANSI-violation)
  318.  
  319.  
  320.  
  321.  58: "invalid unsigned" (Warning, ANSI-violation)
  322.  
  323.  
  324.  
  325.  59: ") expected" (Warning, ANSI-violation)
  326.  
  327.  
  328.  
  329.  60: "array dimension has sidefx (will be ignored)" (Warning, ANSI-violation)
  330.  
  331.  
  332.  
  333.  61: "array of size 0 (set to 1)" (Warning, ANSI-violation)
  334.  
  335.         ANSI C does not allow arrays or any objects to have a size of 0.
  336.  
  337.  
  338.  62: "] expected" (Warning, ANSI-violation)
  339.  
  340.  
  341.  
  342.  63: "mixed identifier- and parameter-type-list" (Warning, ANSI-violation)
  343.  
  344.  
  345.  
  346.  64: "var <%s> was never assigned a value" (Warning)
  347.  
  348.  
  349.  
  350.  65: "var <%s> was never used" (Warning)
  351.  
  352.  
  353.  
  354.  66: "invalid storage-class" (Warning, ANSI-violation)
  355.  
  356.  
  357.  
  358.  67: "type defaults to int" (Warning)
  359.  
  360.  
  361.  
  362.  68: "redeclaration of var <%s> with new type" (Warning, ANSI-violation)
  363.  
  364.  
  365.  
  366.  69: "redeclaration of parameter <%s>" (Warning, ANSI-violation)
  367.  
  368.  
  369.  
  370.  70: ": expected" (Warning, ANSI-violation)
  371.  
  372.  
  373.  
  374.  71: "illegal escape-sequence in string" (Warning, ANSI-violation)
  375.  
  376.  
  377.  
  378.  72: "character constant contains multiple chars" (Warning)
  379.  
  380.  
  381.  
  382.  73: "could not evaluate sizeof-expression" (Error, ANSI-violation)
  383.  
  384.  
  385.  
  386.  74: "" expected (unterminated string)" (Error, ANSI-violation)
  387.  
  388.  
  389.  
  390.  75: "something wrong with numeric constant" (Error, ANSI-violation)
  391.  
  392.  
  393.  
  394.  76: "identifier expected" (Fatal, Error, ANSI-violation)
  395.  
  396.  
  397.  
  398.  77: "definition does not match previous declaration" (Warning, ANSI-violation)
  399.  
  400.  
  401.  
  402.  78: "integer added to illegal pointer" (Warning, ANSI-violation)
  403.  
  404.  
  405.  
  406.  79: "offset equals size of object" (Warning)
  407.  
  408.  
  409.  
  410.  80: "offset out of object" (Warning, ANSI-violation)
  411.  
  412.  
  413.  
  414.  81: "only 0 should be cast to pointer" (Warning)
  415.  
  416.  
  417.  
  418.  82: "unknown identifier <%s>" (Error, ANSI-violation)
  419.  
  420.  
  421.  
  422.  83: "too few function arguments" (Warning, ANSI-violation)
  423.  
  424.  
  425.  
  426.  84: "division by zero (result set to 0)" (Warning, ANSI-violation)
  427.  
  428.  
  429.  
  430.  85: "assignment of different pointers" (Warning, ANSI-violation)
  431.  
  432.  
  433.  
  434.  86: "lvalue required for assignment" (Error, ANSI-violation)
  435.  
  436.  
  437.  
  438.  87: "assignment to constant type" (Error, ANSI-violation)
  439.  
  440.  
  441.  
  442.  88: "assignment to incomplete type" (Error, ANSI-violation)
  443.  
  444.  
  445.  
  446.  89: "operands for || and && have to be arithmetic or pointer" (Error, ANSI-violation)
  447.  
  448.  
  449.  
  450.  90: "bitwise operations need integer operands" (Error, ANSI-violation)
  451.  
  452.  
  453.  
  454.  91: "assignment discards const" (Warning, ANSI-violation)
  455.  
  456.         You assigned something like (const type *) to (type *).
  457.  
  458.  
  459.  92: "relational expression needs arithmetic or pointer type" (Error, ANSI-violation)
  460.  
  461.  
  462.  
  463.  93: "both operands of comparison must be pointers" (Error, ANSI-violation)
  464.  
  465.         You wrote an expression like a == b where one operand was a pointer
  466.         while the other was not. Perhaps a function is not declared correctly
  467.         or you used NULL instead of 0?
  468.  
  469.  
  470.  94: "operand needs arithmetic type" (Error, ANSI-violation)
  471.  
  472.  
  473.  
  474.  95: "pointer arithmetic with void * is not possible" (Error, ANSI-violation)
  475.  
  476.         Adding/subtracting from a pointer to void is not possible.
  477.  
  478.  
  479.  96: "pointers can only be subtracted" (Error, ANSI-violation)
  480.  
  481.         You cannot add, multiply etc. two pointers.
  482.  
  483.  
  484.  97: "invalid types for operation <%s>" (Error, ANSI-violation)
  485.  
  486.  
  487.  
  488.  98: "invalid operand type" (Error, ANSI-violation)
  489.  
  490.  
  491.  
  492.  99: "integer-pointer is not allowed" (Error, ANSI-violation)
  493.  
  494.         You may not subtract a pointer from an integer.
  495.         Adding an integer or subtracting it from a pointer is ok.
  496.  
  497.  
  498. 100: "assignment discards volatile" (Warning, ANSI-violation)
  499.  
  500.         You assigned something like (volatile type *) to (type *).
  501.  
  502.  
  503. 101: "<<, >> and % need integer operands" (Error, ANSI-violation)
  504.  
  505.  
  506.  
  507. 102: "casting from void is not allowed" (Error, ANSI-violation)
  508.  
  509.         Casting something of type void to anything makes no sense.
  510.  
  511.  
  512. 103: "integer too large to fit into pointer" (Error, ANSI-violation)
  513.  
  514.         You tried to assign an integer to a pointer that is too small to
  515.         hold the integer.
  516.         Note that assignment of pointers<->integers is never portable.
  517.  
  518.  
  519. 104: "only integers can be cast to pointers" (Error, ANSI-violation)
  520.  
  521.  
  522.  
  523. 105: "invalid cast" (Error, ANSI-violation)
  524.  
  525.  
  526.  
  527. 106: "pointer too large to fit into integer" (Error, ANSI-violation)
  528.  
  529.         You tried to assign a pointer to an integer that is too small to
  530.         hold the pointer.
  531.         Note that assignment of pointers<->integers is never portable.
  532.  
  533.  
  534. 107: "unary operator needs arithmetic type" (Error, ANSI-violation)
  535.  
  536.  
  537.  
  538. 108: "negation type must be arithmetic or pointer" (Error, ANSI-violation)
  539.  
  540.  
  541.  
  542. 109: "complement operator needs integer type" (Error, ANSI-violation)
  543.  
  544.  
  545.  
  546. 110: "pointer assignment with different qualifiers" (Warning, ANSI-violation)
  547.  
  548.         You tried to assign a pointer to a pointer that points to a type
  549.         with different qualifiers (e.g. signed<->unsigned).
  550.  
  551.  
  552. 111: "dereferenced object is no pointer" (Error, ANSI-violation)
  553.  
  554.  
  555.  
  556. 112: "dereferenced object is incomplete" (Error, ANSI-violation)
  557.  
  558.         You tried to dereference a pointer to an incomplete object.
  559.         Either you had a pointer to an array of unknown size or a pointer
  560.         to a struct or union that was not (yet) defined.
  561.  
  562.  
  563. 113: "only 0 should be assigned to pointer" (Warning, ANSI-violation)
  564.  
  565.         You may not assign constants other than a null pointer to any
  566.         pointer.
  567.  
  568.  
  569. 114: "typedef <%s> is initialized" (Warning, ANSI-violation)
  570.  
  571.  
  572.  
  573. 115: "lvalue required to take address" (Error, ANSI-violation)
  574.  
  575.         You can only get the address of an object, but not of expressions
  576.         etc.
  577.  
  578.  
  579. 116: "unknown var <%s>" (Error, ANSI-violation)
  580.  
  581.  
  582.  
  583. 117: "address of register variables not available" (Error, ANSI-violation)
  584.  
  585.         If a variable is declared as 'register' its address may not be
  586.         taken (no matter if the variable actually gets assigned to a
  587.         register).
  588.  
  589.  
  590. 118: "var <%s> initialized after 'extern'" (Warning)
  591.  
  592.  
  593.  
  594. 119: "const var <%s> not initialized" (Warning)
  595.  
  596.         A constant variable was not initialized in its definition.
  597.         As there is no other legal way to assign a value to a constant
  598.         variable this is probable an error.
  599.  
  600.  
  601. 120: "function definition after 'extern'" (Warning, ANSI-violation)
  602.  
  603.  
  604.  
  605. 121: "return type of main is not int" (Warning, ANSI-violation)
  606.  
  607.         main() should be defined as
  608.  
  609.             int main(int argc, char **argv)
  610.  
  611.         Especially the return type of main must be 'int' - 'void' is
  612.         not allowed by ANSI C.
  613.  
  614.  
  615. 122: "invalid storage-class for function parameter" (Warning, ANSI-violation)
  616.  
  617.         Function parameters may only have 'auto' or 'register' as
  618.         storage-class. 'static' or 'extern' are not allowed.
  619.  
  620.  
  621. 123: "formal parameters conflict with parameter-type-list" (Warning, ANSI-violation)
  622.  
  623.  
  624.  
  625. 124: "parameter type defaults to int" (Warning)
  626.  
  627.         A function definition contains no explicit type specifier.
  628.         'int' will be assumed.
  629.  
  630.  
  631. 125: "no declaration-specifier, used int" (Warning, ANSI-violation)
  632.  
  633.         A variable was declared/defined without a type specified.
  634.         This is not allowed in ANSI C (apart from functions).
  635.  
  636.  
  637. 126: "no declarator in prototype" (Warning, ANSI-violation)
  638.  
  639.  
  640.  
  641. 127: "static var <%s> never defined" (Warning)
  642.  
  643.  
  644.  
  645. 128: "} expected" (Warning)
  646.  
  647.  
  648.  
  649. 129: "left operand of comma operator has no side-effects" (Warning)
  650.  
  651.         In an expression of the form a,b a has no side-effects and is
  652.         therefore superfluous.
  653.  
  654.  
  655. 130: "label empty" (Error, ANSI-violation)
  656.  
  657.         There was a ':' without an identifier before it.
  658.  
  659.  
  660. 131: "redefinition of label <%s>" (Error, ANSI-violation)
  661.  
  662.         The label was defined more than once in the same function.
  663.         Consider that labels can not be hidden in inner blocks.
  664.  
  665.  
  666. 132: "case without switch" (Error, ANSI-violation)
  667.  
  668.         A case label was found outside of any switch-statements.
  669.  
  670.  
  671. 133: "case-expression must be constant" (Error, ANSI-violation)
  672.  
  673.         The expression after 'case' must be constant.
  674.  
  675.  
  676. 134: "case-expression must be integer" (Error, ANSI-violation)
  677.  
  678.         The expression after 'case' must be integer.
  679.  
  680.  
  681. 135: "empty if-expression" (Error, ANSI-violation)
  682.  
  683.         There was no valid expression after 'if'.
  684.  
  685.  
  686. 136: "if-expression must be arithmetic or pointer" (Error, ANSI-violation)
  687.  
  688.         The expression after 'if' must be arithmetic (i.e. an integer
  689.         or floating point type) or a pointer.
  690.  
  691.  
  692. 137: "empty switch-expression" (Error, ANSI-violation)
  693.  
  694.         There was no valid expression after 'switch'.
  695.  
  696.  
  697. 138: "switch-expression must be integer" (Error, ANSI-violation)
  698.  
  699.         The expression after 'switch' must be an integer.
  700.  
  701.  
  702. 139: "multiple default labels" (Error, ANSI-violation)
  703.  
  704.         There was more than one default label in a switch-statement.
  705.  
  706.  
  707. 140: "while-expression must be arithmetic or pointer" (Error, ANSI-violation)
  708.  
  709.         The expression after the 'while' must be arithmetic (i.e. an integer
  710.         or floating point type) or a pointer.
  711.  
  712.  
  713. 141: "empty while-expression" (Error, ANSI-violation)
  714.  
  715.         There was no valid expression after 'while'.
  716.  
  717.  
  718. 142: "for-expression must be arithmetic or pointer" (Error, ANSI-violation)
  719.  
  720.         The expression inside the 'for' must be arithmetic (i.e. an integer
  721.         or floating point type) or a pointer.
  722.  
  723.  
  724. 143: "do-while--expression must be arithmetic or pointer" (Error, ANSI-violation)
  725.  
  726.         The expression after the 'while' must be arithmetic (i.e. an integer
  727.         or floating point type) or a pointer.
  728.  
  729.  
  730. 144: "goto without label" (Error, ANSI-violation)
  731.  
  732.         'goto' must be followed by a label.
  733.  
  734.  
  735. 145: "continue not within loop" (Error, ANSI-violation)
  736.  
  737.         'continue' is only allowed inside of loops.
  738.         Perhaps there are unbalanced '{' '}'.
  739.  
  740.  
  741. 146: "break not in matching construct" (Error, ANSI-violation)
  742.  
  743.         'break' is only allowed inside of loops or switch-statements.
  744.         Perhaps there are unbalanced '{' '}'.
  745.  
  746.  
  747. 147: "label <%s> was never defined" (Error, ANSI-violation)
  748.  
  749.         There is a goto to a label that was never defined.
  750.  
  751.  
  752. 148: "label <%s> was never used" (Warning)
  753.  
  754.         You defined a label, but there is no goto that jumps to it.
  755.  
  756.  
  757. 149: "register %s not ok" (Warning)
  758.  
  759.         There was an internal error (i.e. a bug in the compiler)!
  760.         Please report the error to volker@vb.franken.de. Thanks!
  761.  
  762.  
  763. 150: "default not in switch" (Warning, ANSI-violation)
  764.  
  765.         A default label that is not in any switch-statement was found.
  766.         Perhaps there are unbalanced '{' '}'.
  767.  
  768.  
  769. 151: "( expected" (Warning, ANSI-violation)
  770.  
  771.  
  772.  
  773. 152: "loop eliminated" (Warning)
  774.  
  775.         There was a loop that will never be executed (e.g. while(0)...)
  776.         and therefore the entire loop was eliminated.
  777.         I do not know any reason for such loops, so there is probably an
  778.         error.
  779.  
  780.  
  781. 153: "statement has no effect" (Warning)
  782.  
  783.         There is a statement that does not cause any side-effects (e.g.
  784.         assignments, function calls etc.) and is therefore superfluous.
  785.         E.g. you might have typed a==b; instead of a=b;
  786.  
  787.  
  788. 154: "'while' expected" (Warning, ANSI-violation)
  789.  
  790.         The 'while' in a do-while loop is missing.
  791.  
  792.  
  793. 155: "function should not return a value" (Warning)
  794.  
  795.         You specified an argument to return although the function is
  796.         void. Declare the function as non-void.
  797.  
  798.  
  799. 156: "function should return a value" (Warning)
  800.  
  801.         You did not specify an argument to return although the function
  802.         is not void. Declare the function as void or specify a return
  803.         value.
  804.  
  805.  
  806. 157: "{ expected" (Warning, ANSI-violation)
  807.  
  808.  
  809.  
  810. 158: "internal error %d in line %d of file %s !!" (Fatal, Error)
  811.  
  812.         There was an internal error (i.e. a bug in the compiler)!
  813.         Please report the error to volker@vb.franken.de. Thanks!
  814.  
  815.  
  816. 159: "there is no message number %d" (Fatal)
  817.  
  818.         You tried to activate or suppress a message that does not exist.
  819.  
  820.  
  821. 160: "message number %d cannot be suppressed" (Fatal)
  822.  
  823.         You cannot suppress a message that displays a real error,
  824.         ANSI-violation or another real problem.
  825.         Only 'harmless' warnings can be suppressed.
  826.  
  827.  
  828. 161: "implicit declaration of function <%s>" (Warning)
  829.  
  830.         A function was called before it was declared and therefore
  831.         implicitly declared as
  832.  
  833.             int function();
  834.  
  835.         This should be avoided in new programs.
  836.  
  837.  
  838. 162: "function call without prototype in scope" (Warning)
  839.  
  840.         When writing new programs it is probably sensible to use prototypes
  841.         for every function. If a function is called without a prototype in
  842.         scope this may cause incorrect type conversions and is usually an
  843.         error.
  844.  
  845.  
  846. 163: "#pragma used" (Warning)
  847.  
  848.         Usage of #pragma should be avoided in portable programs.
  849.  
  850.  
  851. 164: "assignment in comparison context" (Warning)
  852.  
  853.         The expression in an if-, for-, while- or do-while-statement
  854.         is an assignment, e.g.
  855.  
  856.             if(i=0)...
  857.  
  858.         This could an error, if you wanted if(i==0).
  859.         If you turned on this warning and want it to shut up for a
  860.         certain expression you can cast it to its type, e.g.
  861.  
  862.             if((int)(i=0))...
  863.  
  864.         Note that only assignments with '=' will be warned, not '+=' etc.
  865.  
  866.  
  867. 165: "comparison redundant because operand is unsigned" (Warning)
  868.  
  869.         A comparison with an unsigned variable is redundant, because
  870.         the result will always be constant, e.g.
  871.  
  872.             unsigned int i;
  873.             if(i<0)...
  874.  
  875.         This usually is a programming error and can be avoided in all cases.
  876.  
  877.  
  878. 166: "cast to narrow type may cause loss of precision" (Warning)
  879.  
  880.         A variable is cast to a type smaller than its original type, so
  881.         that some information may get lost.
  882.         However this warning will be displayed in lots of cases where
  883.         no problem can arise, e.g. (short)(a==b).
  884.  
  885.  
  886. 167: "pointer cast may cause alignment problems" (Warning)
  887.  
  888.         A pointer is cast to a pointer to a type with stricter alignment
  889.         requirements, i.e. the new pointer might be invalid if you do not
  890.         know what you are doing.
  891.         Those casts should be avoidable in all 'usual' cases.
  892.  
  893.  
  894. 168: "no declaration of global variable <%s> before definition" (Warning)
  895.  
  896.         It is usually good to declare all global variables (including
  897.         functions) in header files.
  898.  
  899.  
  900. 169: "'extern' inside function" (Warning)
  901.  
  902.         Declaration of external variables in inner blocks is usually
  903.         not a good idea.
  904.  
  905.  
  906. 170: "dead assignment to <%s> eliminated" (Warning)
  907.  
  908.         A variable is assigned a value that is never used or gets
  909.         overwritten before it is used. If this occurs in real code then
  910.         there is either an errror or an unnecessary assignment.
  911.  
  912.         This is detected only in optimizing compilation.
  913.  
  914.  
  915. 171: "var <%s> is used before defined" (Warning)
  916.  
  917.         The variable is used before it was assigned a value and therefore
  918.         is undefined. It cannot be detected if the code where it is used
  919.         can be reached, but if it is reached it will cause undefined
  920.         behaviour. So it is most probably an error either way (see 170).
  921.  
  922.         However not all unitialized usages can be found.
  923.  
  924.         Also note that the compiler may choose convenient values for
  925.         uninitialized variables. Example:
  926.  
  927.             int f(int a)
  928.             {
  929.                 int x;
  930.                 if(a) x=0;
  931.                 return(x);
  932.             }
  933.  
  934.         Here the optimizer may choose that x==0 if it is uninitialized and
  935.         then only generate a return(0);
  936.         It can also happen that you get different values if you read an
  937.         uninitialized variable twice although it was not assigned a value
  938.         inbetween.
  939.  
  940.         This is only detected in optimizing compilation.
  941.  
  942.  
  943. 172: "would need more than %ld optimizer passes for best results" (Warning)
  944.  
  945.         The optimizer would probably be able to do some further
  946.         optimizations if you increased the number of allowed passes
  947.         with the -optpasses=n option.
  948.  
  949.  
  950. 173: "function <%s> has no return statement" (Warning)
  951.  
  952.         A non-void function has no return statement. Either this function
  953.         never returns (then better declare it as void) or it reaches
  954.         end of control which would be an error.
  955.  
  956.         As main() cannot be declared as void you will not be warned if
  957.         main has no return statement. If you want a warning for main, too,
  958.         you can turn on warning 174.
  959.  
  960.  
  961. 174: "function <main> has no return statement" (Warning)
  962.  
  963.         The same like 173 for main, so you can turn it on/off separately.
  964.  
  965.  
  966. 175: "this code is weird" (Warning)
  967.  
  968.         The code has a very strange control flow. There is probably a
  969.         jump inside a loop or something similar and the optimizer will
  970.         not make any loop optimization and perhaps worse register
  971.         allocation on this construct.
  972.         There must be goto statements in the source.
  973.  
  974.         This warning is only detected in optimizing compilation.
  975.  
  976.  
  977. 176: "size of incomplete type not available" (Warning, ANSI-violation)
  978.  
  979.         An incomplete type must not be the argument for sizeof.
  980.  
  981.  
  982. 177: "line too long" (FATAL, Error, ANSI-violation, Preprocessor)
  983.  
  984.  
  985.  
  986. 178: "identifier must begin with a letter or underscore" (FATAL, Error, ANSI-violation, Preprocessor)
  987.  
  988.  
  989.  
  990. 179: "cannot redefine macro" (Error, ANSI-violation, Preprocessor)
  991.  
  992.  
  993.  
  994. 180: "missing ) after argumentlist" (Error, ANSI-violation, Preprocessor)
  995.  
  996.  
  997.  
  998. 181: "identifier expected" (Error, ANSI-violation, Preprocessor)
  999.  
  1000.  
  1001.  
  1002. 182: "illegal character in identifier" (Error, ANSI-violation, Preprocessor)
  1003.  
  1004.  
  1005.  
  1006. 183: "missing operand before/after ##" (Error, ANSI-violation, Preprocessor)
  1007.  
  1008.  
  1009.  
  1010. 184: "no macro-argument after #-operator" (Error, ANSI-violation, Preprocessor)
  1011.  
  1012.  
  1013.  
  1014. 185: "macro redefinition not allowed" (Error, ANSI-violation, Preprocessor)
  1015.  
  1016.  
  1017.  
  1018. 186: "unexpected end of file (unterminated comment)" (FATAL, Error, Preprocessor)
  1019.  
  1020.  
  1021.  
  1022. 187: "too many nested includes" (FATAL, Error, Preprocessor)
  1023.  
  1024.  
  1025.  
  1026. 188: "#else without #if/#ifdef/#ifndef" (FATAL, Error, ANSI-violation, Preprocessor)
  1027.  
  1028.  
  1029.  
  1030. 189: "#else after #else" (Error, ANSI-violation, Preprocessor)
  1031.  
  1032.  
  1033.  
  1034. 190: "#endif without #if" (Error, ANSI-violation, Preprocessor)
  1035.  
  1036.  
  1037.  
  1038. 191: "cannot include file" (FATAL, Error, Preprocessor)
  1039.  
  1040.  
  1041.  
  1042. 192: "expected \" or < in #include-directive" (Error, ANSI-violation, Preprocessor)
  1043.  
  1044.  
  1045.  
  1046. 193: "unknown #-directive" (Warning, Preprocessor)
  1047.  
  1048.  
  1049.  
  1050. 194: "wrong number of macro arguments" (Error, ANSI-violation, Preprocessor)
  1051.  
  1052.  
  1053.  
  1054. 195: "macro argument expected" (Error, ANSI-violation, Preprocessor)
  1055.  
  1056.  
  1057.  
  1058. 196: "out of memory" (FATAL, Error, Preprocessor)
  1059.  
  1060.  
  1061.  
  1062. 197: "macro redefinition" (Warning, Preprocessor)
  1063.  
  1064.  
  1065.  
  1066. 198: "/* in comment" (Warning, Preprocessor)
  1067.  
  1068.  
  1069.  
  1070. 199: "cannot undefine macro" (Error, ANSI-violation, Preprocessor)
  1071.  
  1072.  
  1073.  
  1074. 200: "characters after #-directive ignored" (Warning, Preprocessor)
  1075.  
  1076.  
  1077.  
  1078. 201: "duplicate case labels" (Warning, ANSI-violation)
  1079.  
  1080.         Each case-label in a switch-statement must have a distinct constant
  1081.         value attached (after converting it to the type of the
  1082.         switch-expression).
  1083.  
  1084.  
  1085. 202: "var <%s> is incomplete" (Warning, ANSI-violation)
  1086.  
  1087.         An incomplete var was defined. probably you wrote something like:
  1088.  
  1089.             int a[];
  1090.  
  1091.  
  1092. 203: "long float is no longer valid" (Warning, ANSI-violation)
  1093.  
  1094.         'long float' was a synonym for double in K&R C, but this is no longer
  1095.         allowed in ANSI C.
  1096.  
  1097.  
  1098. 204: "long double is not really supported by vbcc" (Warning)
  1099.  
  1100.         vbcc does not know about long double yet and therefore will use it
  1101.         simply as a synonym for double. This should not break any legal code,
  1102.         but you will not get error messages if you e.g. assign a pointer to
  1103.         double to a pointer to long double.
  1104.  
  1105.  
  1106. 205: "empty struct-declarations are not yet handled correct" (Warning)
  1107.  
  1108.         obsolete
  1109.  
  1110.  
  1111. 206: "identifier too long (only %d characters are significant)" (Warning)
  1112.  
  1113.  
  1114.  
  1115. 207: "illegal initialization of var <%s>" (Warning, ANSI-violation)
  1116.  
  1117.         Perhaps you tried to initialize a variable with external linkage
  1118.         in an inner block.
  1119.  
  1120.  
  1121. 208: "suspicious loop" (Warning)
  1122.  
  1123.         vbcc thinks a loop-condition looks suspicious. A possible example
  1124.         could be for(i=0;i!=7;i+=2)
  1125.  
  1126.  
  1127. 209: "ansi/iso-mode turned on" (Warning)
  1128.  
  1129.         You turned on the ANSI/ISO-conforming mode. This warning is always
  1130.         displayed unless it is suppressed. So vbcc cannot be blamed to miss
  1131.         a diagnostic for any constraint violation. :-)
  1132.  
  1133.  
  1134. 210: "division by zero (result set to 0)" (Warning, ANSI-violation)
  1135.  
  1136.         Similar to warning 84.
  1137.  
  1138.  
  1139. 211: "constant out of range" (Warning, ANSI-violation)
  1140.  
  1141.         An integral constant is too large to fit into an unsigned long.
  1142.  
  1143.  
  1144. 212: "constant is unsigned due to size" (Warning)
  1145.  
  1146.         If an integral constant is so large that it cannot be represented
  1147.         as long its type is promoted to unsigned long.
  1148.  
  1149.  
  1150. 213: "varargs function called without prototype in scope" (Warning)
  1151.  
  1152.         A function which takes a variable number of arguments must not be
  1153.         called without a prototype in scope. E.g. calling printf() without
  1154.         #include <stdio.h> may cause this warning.
  1155.  
  1156.  
  1157. 214: "suspicious format string" (Warning)
  1158.  
  1159.         The format-string of a printf-/scanflike function seems to be corrupt
  1160.         or not matching the type of the arguments.
  1161.  
  1162.  
  1163. 215: "format string contains \'\\0\'" (Warning)
  1164.  
  1165.         The format string for a printf-/scanflike function contains an
  1166.         embedded '\0' character.
  1167.  
  1168.  
  1169. 216: "illegal use of keyword <%s>" (Warning, ANSI-violation)
  1170.  
  1171.         The reserved keywords of C may not be used as identifier.
  1172.  
  1173.  
  1174. 217: "register <%s> used with wrong type" (Error)
  1175.  
  1176.  
  1177. 218: "register <%s> is not free" (Error)
  1178.  
  1179.  
  1180. 219: "'__reg' used in old-style function definition" (Warning)
  1181.  
  1182.  
  1183. 220: "unknown register \"%s\"" (Warning)
  1184.  
  1185.  
  1186. 221: "'...' only allowed with prototypes" (Warning, ANSI-violation)
  1187.  
  1188.  
  1189. 222: "Hey, do you really know the priority of '&&' vs. '||'?" (Warning)
  1190.  
  1191.  
  1192. 223: "be careful with priorities of <</>> vs. +/-" (Warning)
  1193.  
  1194.  
  1195. 224: "adress of auto variable returned" (Warning)
  1196.  
  1197.  
  1198. 225: "void function returns a void expression" (Warning)
  1199.  
  1200.  
  1201. 226: "redeclaration of typedef <%s>" (Warning, ANSI-violation)
  1202.  
  1203.  
  1204. 227: "multiple specification of attribute \"%s\"" (Warning)
  1205.  
  1206.  
  1207. 228: "redeclaration of var \"%s\" with differing setting of attribute \"%s\"" (Warning)
  1208.  
  1209.  
  1210.